﻿using System.Diagnostics;

namespace CTP.CRM.Core.SqlSugar
{
    //
    // 摘要:
    //     SqlSugar的活动存储
    public static class SqlSugarActivityStorage
    {
        private static readonly AsyncLocal<Activity> _currentActivity = new AsyncLocal<Activity>();

        //
        // 摘要:
        //     获取当前活动
        public static Activity CurrentActivity
        {
            get
            {
                return _currentActivity.Value;
            }
            set
            {
                _currentActivity.Value = value;
            }
        }
    }
}
